package cn.xianshu;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class IP {
    @GetMapping("/")
    public void test(HttpServletRequest request) {
        System.out.println(IpUtils.getClientIpAddr(request));
        System.out.println(IpUtils.getClientIpAddress(request));
        System.out.println(IpUtils.getIpAddr(request));
        System.out.println(IpUtils.getRemoteAddr(request));
    }

}